package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 保养工单编号
 * @TableName device_mwo
 */
@TableName(value ="device_mwo")
@Data
public class DeviceMwo implements Serializable {
    /**
     * 保养工单编号
     */
    @TableId(type = IdType.AUTO)
    private Integer mwoId;

    /**
     * 保养工单编码
     */
    private String code;

    /**
     * 工单主题
     */
    private String mwoTheme;

    /**
     * 工单状态(外键)
     */
    private String state;

    /**
     * 工单类型(0-下发工单 1-快速工单)
     */
    private String mwoOrderType;

    /**
     * 保养班组
     */
    private String mwoClass;

    /**
     * 保养负责人
     */
    private String mwoPerson;

    /**
     * 派单人员
     */
    private String dispatchers;

    /**
     * 所在部门
     */
    private String department;

    /**
     * 开始保养时间
     */
    private Date mwoOntime;

    /**
     * 结束保养时间
     */
    private Date mwoUntime;

    /**
     * 保养总用时
     */
    private Date mwoTime;

    /**
     * 工作描述
     */
    private String jobDescription;

    /**
     * 保养费用
     */
    private Long mwoMoney;

    /**
     * 设备编号外键
     */
    private Integer deviceNumber;

    /**
     * 是否更换设备(0-是 1-否)
     */
    private Integer mwoReplace;

    /**
     * 验收人
     */
    private String acceptPerson;

    /**
     * 验收时间
     */
    private Date acceptTime;

    /**
     * 创建时间
     */
    private Date insertTime;

    /**
     * 创建人
     */
    private String insertPerson;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 更新人
     */
    private String updatePerson;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceMwo other = (DeviceMwo) that;
        return (this.getMwoId() == null ? other.getMwoId() == null : this.getMwoId().equals(other.getMwoId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getMwoTheme() == null ? other.getMwoTheme() == null : this.getMwoTheme().equals(other.getMwoTheme()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getMwoOrderType() == null ? other.getMwoOrderType() == null : this.getMwoOrderType().equals(other.getMwoOrderType()))
            && (this.getMwoClass() == null ? other.getMwoClass() == null : this.getMwoClass().equals(other.getMwoClass()))
            && (this.getMwoPerson() == null ? other.getMwoPerson() == null : this.getMwoPerson().equals(other.getMwoPerson()))
            && (this.getDispatchers() == null ? other.getDispatchers() == null : this.getDispatchers().equals(other.getDispatchers()))
            && (this.getDepartment() == null ? other.getDepartment() == null : this.getDepartment().equals(other.getDepartment()))
            && (this.getMwoOntime() == null ? other.getMwoOntime() == null : this.getMwoOntime().equals(other.getMwoOntime()))
            && (this.getMwoUntime() == null ? other.getMwoUntime() == null : this.getMwoUntime().equals(other.getMwoUntime()))
            && (this.getMwoTime() == null ? other.getMwoTime() == null : this.getMwoTime().equals(other.getMwoTime()))
            && (this.getJobDescription() == null ? other.getJobDescription() == null : this.getJobDescription().equals(other.getJobDescription()))
            && (this.getMwoMoney() == null ? other.getMwoMoney() == null : this.getMwoMoney().equals(other.getMwoMoney()))
            && (this.getDeviceNumber() == null ? other.getDeviceNumber() == null : this.getDeviceNumber().equals(other.getDeviceNumber()))
            && (this.getMwoReplace() == null ? other.getMwoReplace() == null : this.getMwoReplace().equals(other.getMwoReplace()))
            && (this.getAcceptPerson() == null ? other.getAcceptPerson() == null : this.getAcceptPerson().equals(other.getAcceptPerson()))
            && (this.getInsertTime() == null ? other.getInsertTime() == null : this.getInsertTime().equals(other.getInsertTime()))
            && (this.getInsertPerson() == null ? other.getInsertPerson() == null : this.getInsertPerson().equals(other.getInsertPerson()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public String toString() {
        return "DeviceMwo{" +
                "mwoId=" + mwoId +
                ", code='" + code + '\'' +
                ", mwoTheme='" + mwoTheme + '\'' +
                ", state='" + state + '\'' +
                ", mwoOrderType='" + mwoOrderType + '\'' +
                ", mwoClass='" + mwoClass + '\'' +
                ", mwoPerson='" + mwoPerson + '\'' +
                ", dispatchers='" + dispatchers + '\'' +
                ", department='" + department + '\'' +
                ", mwoOntime=" + mwoOntime +
                ", mwoUntime=" + mwoUntime +
                ", mwoTime=" + mwoTime +
                ", jobDescription='" + jobDescription + '\'' +
                ", mwoMoney=" + mwoMoney +
                ", deviceNumber=" + deviceNumber +
                ", mwoReplace=" + mwoReplace +
                ", acceptPerson='" + acceptPerson + '\'' +
                ", acceptTime=" + acceptTime +
                ", insertTime=" + insertTime +
                ", insertPerson='" + insertPerson + '\'' +
                ", updateTime=" + updateTime +
                ", updatePerson='" + updatePerson + '\'' +
                ", isDelete=" + isDelete +
                '}';
    }
}